package com.crm.controller;

import com.crm.commons.domain.ResponseData;
import com.crm.service.ICrmActivityRemarkService;
import com.crm.service.ICrmClueRemarkService;
import com.crm.vo.ActivityRemark;
import com.crm.vo.Clue;
import com.crm.vo.ClueRemark;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author junxian,dou
 * @since 2024-11-25
 */
@RestController
@RequestMapping("/crmClueRemark")
public class CrmClueRemarkController {

    @Resource
    private ICrmClueRemarkService iCrmClueRemarkService;

    @ApiOperation("保存线上评论")
    @PostMapping("/saveCrmClueRemark")
    public ResponseData saveCrmClueRemark(@RequestBody ClueRemark remark){
        iCrmClueRemarkService.saveCrmClueRemark(remark);
        return ResponseData.success();
    }

    @ApiOperation("删除线索")
    @GetMapping("/deleteCrmClueRemark/{id}")
    public ResponseData deleteCrmClueRemark(@PathVariable String id){
        iCrmClueRemarkService.deleteCrmClueRemark(id);
        return ResponseData.success();
    }


    @ApiOperation("更新线索")
    @PostMapping("/updateCrmClueRemark")
    public ResponseData updateCrmClueRemark(@RequestBody ClueRemark remark){
        iCrmClueRemarkService.updateCrmClueRemark(remark);
        return ResponseData.success();
    }

}
